package edu.gyc.hiblog.dao;

import edu.gyc.hiblog.model.Post;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.gyc.hiblog.vo.PostVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ls
 * @since 2020-11-30
 */
@Component
public interface PostDao extends BaseMapper<Post> {
    List<PostVo> selectPostVos();
    List<PostVo> selectPostVosByCondition( Long categoryId, Long userId, Integer level, Boolean recommend, @Param("order")String order);

    PostVo selectOnePostVo(Long id);

    List<Post> queryCollectionByUserId(Long id);
}
